Electronic cigarettes, also known as virtual cigarettes, are mainly used to help people to quit smoking or replace traditional cigarettes. The electronic cigarette mimics the appearance and flavor of the traditional cigarette and gives the psychological feeling of inhaling the traditional cigarette smoke. Moreover, it even can provide much more flavors than the traditional cigarette. Unlike the traditional cigarette, the amount of vapor produced by the electronic cigarette depends on the heating power of a heating coil. The heating power of the electronic cigarette in prior art is constant, which can simplify the circuit but fails to adjust the amount of vapor. In some existing electronic cigarettes, a potentiometer is often employed for adjusting the heating power, but the adjustment carried out by the potentiometer would lead to extra consuming of electricity, and the output would change along with the voltage of batteries, adversely affecting user experience.